Imports Microsoft.VisualBasic

Public MustInherit Class BizObject
    'Protected Const MAXROWS As Integer = Int.MaxValue
    Protected Shared ReadOnly Property Cache() As Cache
        Get
            Return HttpContext.Current.Cache
        End Get
    End Property

    Protected Shared ReadOnly Property CurrentUserName() As String
        Get
            Dim username As String
            username = ""
            If HttpContext.Current.User.Identity.IsAuthenticated Then
                username = HttpContext.Current.User.Identity.Name
            End If
            Return username
        End Get
    End Property

    Protected Shared ReadOnly Property CurrentUserIP() As String
        Get
            Return HttpContext.Current.Request.UserHostAddress
        End Get
    End Property

    Protected Shared ReadOnly Property ConvertNullToEmptyString(ByVal input As String) As String
        Get
            If IsNothing(input) Then Return "" Else Return input
        End Get
    End Property

End Class
